package org.pay.union.enums.debitcredit;

import cn.hutool.core.util.StrUtil;
import lombok.Getter;
import org.pay.union.enums.DebitCredit;

import java.io.Serializable;

/**
 * 微信借贷分离标识
 */
@Getter
public enum AliPayCreditEnum implements Serializable, DebitCredit {
    DEBIT_CARD("借记卡", null),
    CREDIT_CARD("信用卡", null),
    POINT("集分宝", "集分宝"),
    PCREDIT("信用卡", "蚂蚁花呗"),
    DISCOUNT("折扣券", "折扣券"),
    COUPON("支付宝红包", "支付宝红包"),
    ALIPAYACCOUNT("借记卡", "支付宝账户"),
    MDISCOUNT("商户优惠券", "商户优惠券"),
    PCARD("预付卡", "预付卡"),
    MCARD("商家储值卡", "商家储值卡"),
    MCOUPON("商户红包", "商户红包"),
    ;
    private String type;
    private String bank;

    AliPayCreditEnum(String type, String bank) {
        this.type = type;
        this.bank = bank;
    }

    public String getBank() {
        return StrUtil.isBlank(bank)?type:bank;
    }
}
